import { request } from '@/utils/request';

/**
 * 获取用户身份信息
 */
export const getUserIdentity = () => {
  console.log('获取用户身份信息');
  return request({
    url: `/drone/user/identity`,
    method: 'GET',
    loadTime: false
  });
};

/**
 * 检查用户是否为飞手
 */
export const isPilot = () => {
  console.log('检查用户是否为飞手');
  return request({
    url: `/drone/user/isPilot`,
    method: 'GET',
    loadTime: false
  });
};

/**
 * 检查用户是否为组织方
 */
export const isOrganization = () => {
  console.log('检查用户是否为组织方');
  return request({
    url: `/drone/user/isOrganization`,
    method: 'GET',
    loadTime: false
  });
};

/**
 * 获取飞手档案信息
 */
export const getPilotProfile = () => {
  console.log('获取飞手档案信息');
  return request({
    url: `/drone/pilot/me`,
    method: 'GET',
    loadTime: false
  });
};

/**
 * 获取组织信息
 */
export const getOrganizationInfo = () => {
  console.log('获取组织信息');
  return request({
    url: `/drone/organization/me`,
    method: 'GET',
    loadTime: false
  });
};

/**
 * 获取热门飞手列表（只返回审核通过的前5个飞手）
 */
export const getHotPilots = () => {
  console.log('获取热门飞手列表');
  return request({
    url: `/drone/user/pilot/hot`,
    method: 'GET',
    loadTime: false
  });
};